package com.scott.ch030

object ForDemo {

  def main(args: Array[String]): Unit = {

    val nums =1 to 100;
    var sum =0;
    for(index <- nums){
      sum =sum+index;
    }
    print(sum);
  }

}
